package com.huadi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huadi.dao.CollectionDao;
import com.huadi.entity.Collection;
import com.huadi.service.CollectionService;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * (Collection)表服务实现类
 *
 * @author makejava
 * @since 2023-07-03 15:26:47
 */
@Service("collectionService")
public class CollectionServiceImpl extends ServiceImpl<CollectionDao, Collection> implements CollectionService {
    @Override
    public boolean save(Collection collection) {
        collection.setCollectionDate(new Date());
        return super.save(collection);
    }

    @Override
    public boolean updateById(Collection collection) {
        collection.setCollectionDate(new Date());
        return super.updateById(collection);
    }
}

